<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id ="app">
        <h1>插值语法</h1>
        <h3>你好，{{name}}</h3>
        <hr/>
        <h1>指令语法</h1>
        <a v-bind:href="school.url">点我去{{school.name}}学习</a>
        <a :href="school.url">点我去{{school.name}}学习(简写)</a>
    </div>

    <script>
        //创建Vue实例,得到 ViewModel
        const vm = new Vue({
            el: '#app',
            data: {
                name:'Jack',
                school:{
                    name:"尚硅谷",
                    url:'https://baidu.com'
                }
            }
        });
    </script>
</body>
</html>